package com.xjprojectc.business.service.impl;

import java.util.List;

import com.tech.framework.service.impl.BaseServiceImpl;
import com.xjprojectc.business.pojo.T_mobile;
import com.xjprojectc.business.service.MobileService;

@SuppressWarnings("unchecked")
public class MobileServiceImpl extends BaseServiceImpl implements MobileService{
	
	public List<T_mobile> getMobileByPager(T_mobile mobile) {
		return find(T_mobile.class.getName()+".selectPaged", mobile);
	}
	
	public List<T_mobile> getMobileByList(T_mobile mobile) {
		return find(T_mobile.class.getName()+".select", mobile);
	}

	public T_mobile getOneMobile(String id) {
		return (T_mobile) find(T_mobile.class.getName()+".selectById",id).get(0);
	}

	public int getPageCount(T_mobile managerinfo) {
		return Integer.parseInt(find(T_mobile.class.getName()+".selectCount",managerinfo).get(0).toString());
	}
	
	@SuppressWarnings("unchecked")
	public boolean addMobile(T_mobile mobile) {
		boolean bool = false;
		try {
			insert(mobile);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}

	public boolean delMobile(T_mobile mobile) {
		boolean bool = false;
		try {
			remove(mobile);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}


	public boolean updateMobile(T_mobile mobile) {
		boolean bool = false;
		try {
			update(mobile);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}
	
	

	
}
